Optimal. Leaf size=52 \[ -\frac {a \cot ^3(c+d x)}{3 d}+\frac {a \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac {a \cot (c+d x) \csc (c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.11, antiderivative size = 52, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.185, Rules used = {2838, 2607, 30, 2611, 3770} \[ -\frac {a \cot ^3(c+d x)}{3 d}+\frac {a \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac {a \cot (c+d x) \csc (c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2607
Rule 2611
Rule 2838
Rule 3770
Rubi steps
\begin {align*} \int \cot ^2(c+d x) \csc ^2(c+d x) (a+a \sin (c+d x)) \, dx &=a \int \cot ^2(c+d x) \csc (c+d x) \, dx+a \int \cot ^2(c+d x) \csc ^2(c+d x) \, dx\\ &=-\frac {a \cot (c+d x) \csc (c+d x)}{2 d}-\frac {1}{2} a \int \csc (c+d x) \, dx+\frac {a \operatorname {Subst}\left (\int x^2 \, dx,x,-\cot (c+d x)\right )}{d}\\ &=\frac {a \tanh ^{-1}(\cos (c+d x))}{2 d}-\frac {a \cot ^3(c+d x)}{3 d}-\frac {a \cot (c+d x) \csc (c+d x)}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.04, size = 95, normalized size = 1.83 \[ -\frac {a \cot ^3(c+d x)}{3 d}-\frac {a \csc ^2\left (\frac {1}{2} (c+d x)\right )}{8 d}+\frac {a \sec ^2\left (\frac {1}{2} (c+d x)\right )}{8 d}-\frac {a \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )}{2 d}+\frac {a \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.50, size = 119, normalized size = 2.29 \[ \frac {4 \, a \cos \left (d x + c\right )^{3} + 6 \, a \cos \left (d x + c\right ) \sin \left (d x + c\right ) + 3 \, {\left (a \cos \left (d x + c\right )^{2} - a\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 3 \, {\left (a \cos \left (d x + c\right )^{2} - a\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right )}{12 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )} \sin \left (d x + c\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.17, size = 115, normalized size = 2.21 \[ \frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 3 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 12 \, a \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - 3 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {22 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 3 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 3 \, a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - a}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3}}}{24 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.22, size = 80, normalized size = 1.54 \[ -\frac {a \left (\cos ^{3}\left (d x +c \right )\right )}{2 d \sin \left (d x +c \right )^{2}}-\frac {a \cos \left (d x +c \right )}{2 d}-\frac {a \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{2 d}-\frac {a \left (\cos ^{3}\left (d x +c \right )\right )}{3 d \sin \left (d x +c \right )^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.31, size = 61, normalized size = 1.17 \[ \frac {3 \, a {\left (\frac {2 \, \cos \left (d x + c\right )}{\cos \left (d x + c\right )^{2} - 1} + \log \left (\cos \left (d x + c\right ) + 1\right ) - \log \left (\cos \left (d x + c\right ) - 1\right )\right )} - \frac {4 \, a}{\tan \left (d x + c\right )^{3}}}{12 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 8.58, size = 111, normalized size = 2.13 \[ \frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}-\frac {a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8\,d}+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{24\,d}-\frac {a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{2\,d}-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (-a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+\frac {a}{3}\right )}{8\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________